package db.pojo;

import java.util.*;
import java.text.SimpleDateFormat;
import db.ext.EasequenceExt;
@SuppressWarnings("unchecked")
/**
 * easequence
 */
public class Easequence {
	/**
	 * SEQUENCEID
	 */
	public String sEQUENCEID;
	/**
	 * FIELDNAME
	 */
	public String fIELDNAME;
	/**
	 * MAXID
	 */
	public String mAXID;
	/**
	 * REMARK
	 */
	public String rEMARK;
	/**
	 * PATTERN
	 */
	public String pATTERN;
	/**
	 * IDTYPE
	 */
	public String iDTYPE;
	SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	public static EasequenceExt DB = new EasequenceExt(); 
	
	public Easequence() {
		super();
	}
	
	public Easequence(String sEQUENCEID, String fIELDNAME, String mAXID, String rEMARK, String pATTERN, String iDTYPE) {
		super();
		this.sEQUENCEID = sEQUENCEID; 
		this.fIELDNAME = fIELDNAME; 
		this.mAXID = mAXID; 
		this.rEMARK = rEMARK; 
		this.pATTERN = pATTERN; 
		this.iDTYPE = iDTYPE; 
	}
	
	public String getSEQUENCEID() {
		return sEQUENCEID;
	}

	public void setSEQUENCEID(String sEQUENCEID) {
		this.sEQUENCEID = sEQUENCEID;
	} 
	
	public String getFIELDNAME() {
		return fIELDNAME;
	}

	public void setFIELDNAME(String fIELDNAME) {
		this.fIELDNAME = fIELDNAME;
	} 
	
	public String getMAXID() {
		return mAXID;
	}

	public void setMAXID(String mAXID) {
		this.mAXID = mAXID;
	} 
	
	public String getREMARK() {
		return rEMARK;
	}

	public void setREMARK(String rEMARK) {
		this.rEMARK = rEMARK;
	} 
	
	public String getPATTERN() {
		return pATTERN;
	}

	public void setPATTERN(String pATTERN) {
		this.pATTERN = pATTERN;
	} 
	
	public String getIDTYPE() {
		return iDTYPE;
	}

	public void setIDTYPE(String iDTYPE) {
		this.iDTYPE = iDTYPE;
	} 
	
	
	public Map easequenceToMap() {
		Map map = new HashMap();
		try {
			map.put("sEQUENCEID",this.sEQUENCEID);
			map.put("fIELDNAME",this.fIELDNAME);
			map.put("mAXID",this.mAXID);
			map.put("rEMARK",this.rEMARK);
			map.put("pATTERN",this.pATTERN);
			map.put("iDTYPE",this.iDTYPE);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return map;
	}

	public Easequence mapToEasequence(Map map){
		try {
			String sEQUENCEID =  map.get("sEQUENCEID").toString();
			String fIELDNAME =  map.get("fIELDNAME").toString();
			String mAXID =  map.get("mAXID").toString();
			String rEMARK =  map.get("rEMARK").toString();
			String pATTERN =  map.get("pATTERN").toString();
			String iDTYPE =  map.get("iDTYPE").toString();
			Easequence easequence = new Easequence(sEQUENCEID, fIELDNAME, mAXID, rEMARK, pATTERN, iDTYPE);
			return easequence;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	} 
	
	public String toString(){
		return easequenceToMap().toString();
	}
	
	//方便数据操作	
	public Easequence insert(){
		return DB.insert(this);
	}
	public Easequence update(){
		return DB.update(this);
	}
	
	public int delete(){
		return DB.delete(this);
	}
	
}
